﻿using System.Collections.ObjectModel;
using Eassets.Layered.Domain.Asset;
using Eassets.Data.Asset;

namespace Eassets.Service.Asset
{
    public class OrganizationLevelListAssetService
    {
        OrganizationLevelListAssetData organizationLevelAssetdata = new OrganizationLevelListAssetData();

        public void AddOrganizationLevelListAsset(OrganizationLevelListAsset organizationLevelAsset)
        {
            if (organizationLevelAsset != null)
            {
                organizationLevelAssetdata.AddOrganizationLevelListAsset(organizationLevelAsset);
            }
        }

        public void ModifyOrganizationLevelListAsset(OrganizationLevelListAsset organizationLevelAsset)
        {
            if (organizationLevelAsset != null)
            {
                organizationLevelAssetdata.ModifyOrganizationLevelListAsset(organizationLevelAsset);
            }
        }

        /// <summary>
        /// Updates organizationLevelAsset.
        /// </summary>
        /// <param name="organizationLevelAsset"></param>
        public void ModifyOrganizationLevelListAssetByAssetId(OrganizationLevelListAsset organizationLevelAsset)
        {
            if (organizationLevelAsset != null)
            {
                organizationLevelAssetdata.ModifyOrganizationLevelListAssetByAssetId(organizationLevelAsset);
            }
        }

        /// <summary>
        /// Delete organizationLevelAsset.
        /// </summary>
        /// <param name="organizationLevelAssetId"></param>
        public void DeleteOrganizationLevelListAsset(long organizationLevelAssetId)
        {
            if (organizationLevelAssetId != 0)
            {
                organizationLevelAssetdata.DeleteOrganizationLevelListAsset(organizationLevelAssetId);
            }
        }

        /// <summary>
        /// GetbyId organizationLevelAsset.
        /// </summary>
        /// <param name="organizationLevelAssetId"></param>
        /// <returns></returns>
        public OrganizationLevelListAsset GetByIdOrganizationLevelListAsset(long organizationLevelAssetId)
        {
            return organizationLevelAssetdata.GetByIdOrganizationLevelListAsset(organizationLevelAssetId);
        }

        /// <summary>
        /// GetAll organizationLevelAsset.
        /// </summary>
        /// <returns></returns>
        public Collection<OrganizationLevelListAsset> GetAllOrganizationLevelListAsset()
        {
            return organizationLevelAssetdata.GetAllOrganizationLevelListAsset();
        }

        /// <summary>
        /// GetAll OrganizationLevelListAssetCount
        /// </summary>
        /// <returns></returns>
        public Collection<OrganizationLevelListAssetCount> GetAllOrganizationLevelListAssetCount()
        {
            return organizationLevelAssetdata.GetAllOrganizationLevelListAssetCount();
        }

        /// <summary>
        /// Deduct one from noOfAssets of organizationLevelAsset.
        /// </summary>
        /// <param name="assetId"></param>
        public void MinusOrganizationLevelListAsset(long assetId)
        {
            organizationLevelAssetdata.MinusOrganizationLevelListAsset(assetId);
        }
    }
}
